{include file="public/top"}
<article class="page-container">
    <form id="form-question-add" class="form-horizontal" role="form" name="score" action="" method="post"
          enctype="multipart/form-data">
        <!--{:token()}-->
        <div class="row cl" style="padding-top:20px;margin-left:-40px;">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>所属题库：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <label>{$art.examstudent.qbankname.bank_name}</label>
            </div>
        </div>
{php}
        $answers=json_decode($art->exam_answers);
        $q5=$answers;
        $an=array();
        foreach((array)$q5 as $q){
        $an[]=$q;
        }
        {/php}

{volist name="ques" id="que" key="i"}
        <div class="row cl" style="padding-top:20px;margin-left:-40px;">
            <label for="content" class="form-label col-xs-4 col-sm-2">题目内容：</label>
            <div class="formControls col-xs-8 col-sm-9">

                <p>{$que}</p>
            </div>
            <label for="answer" class="form-label col-xs-4 col-sm-2">用户答案：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <p>{$an[$i-1]}</p>
            </div>
        </div>
        <div class="row cl" style="padding-top: 20px;margin-left:-40px;">
            <label for="content" class="form-label col-xs-4 col-sm-2">分数：</label>
            <input type="text"name="score_{$i}">
        </div>


        {/volist}
        <div class="row cl" style="padding-top:20px;margin-left:40px;">
        <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
            <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
        </div>
    </div>
    </form>
</article>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__ADMIN__/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/jquery.validation/1.14.0/messages_zh.js"></script>

<script type="text/javascript" src="__ADMIN__/lib/ueditor/1.4.3/ueditor.config.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/ueditor/1.4.3/ueditor.all.min.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/ueditor/1.4.3/ueditor.all.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    $(function () {
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });


    });
</script>
<script type="text/javascript">

    function test() {
        var vals = $("select[name='qtype_id']").val();
        $("#q_num").hide();
        for (var i = 1; i < "7"; i++) {
            var v = "q_type" + vals;

            if (i == vals) {

                $("#q_type" + i).show();
        alert(i);
            } else {
                $("#q_type" + i).hide();
            }
            if (vals == "1" || vals == "2") {

                var test = document.getElementById('q_num');
                $("#q_num").show();
                $(".selector").val("");


            }
        }
    }

    function changeAns() {
        var vals = $("select[name='qnum']").val();
        var type = $("select[name='qtype_id']").val();
        var p = document.getElementById('q_type' + type);
        var childs = p.childNodes;

        for (var i = childs.length - 1; i >= 0; i--) {
            p.removeChild(childs[i]);
        }
        var arr = ["A", "B", "C", "D", "E", "F"]
        for (var i = 0; i < vals; i++) {
            var input = document.createElement("input");
            input.setAttribute("type", "text");
            input.setAttribute("name", "q_type" + type + "." + arr[i]);
            input.setAttribute("class", "input-text");
            var br = document.createElement("br");
            var label = document.createElement("laber");
            label.innerText = arr[i] + ":";
            p.appendChild(label);
            p.appendChild(input);
            p.appendChild(br);

        }

    }

</script>
<!--/请在上方写此页面业务相关的脚本-->
{include file="public/footer"}